package com.gome.splunk.Common;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by i.Recall_Star on 2017/5/10.
 */

public class TimeHelper {

    // 获取当前时间
    public static String getCurrentTime(){
        SimpleDateFormat   formatter   =   new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
        Date curDate =  new Date(System.currentTimeMillis());
        String  currentTime   =   formatter.format(curDate);
        return currentTime;
    }

    // 获取当前时间秒数
    public static long currentTimeMillis(){
        Date dt= new Date();
        Long time= dt.getTime();
        return time;
    }
}
